﻿using System.Collections.Generic;
using Netkk.Common.Models;
using Netkk.Data.Provider;

namespace Netkk.Library.Repositories
{
    public class NewsRepository : INewsRepository
    {
        private static DataProvider Provider
        {
            get { return DataProviderManager.Provider; }
        }

        public IEnumerable<News> Select()
        {
            return Provider.SelectAllNews();
        }

        public void Delete(News news)
        {
            Provider.DeleteNews(news);
        }

        public void Save(News news)
        {
            Provider.SaveNews(news);
        }

    }

}
